﻿using Easy4net.Common;
using Easy4net.DBUtility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace JSMS.Controllers
{
    public class TeacherController : Controller
    {
        //
        // GET: /Teacher/

        public ActionResult IndexTeacher()
        {
            return View();
        }
        [HttpPost]
        [ValidateInput(false)]
        public JsonResult PublicHomeWork(string title,string description,int teacherid)
        {
            DBHelper db =  DBHelper.getInstance();
            string sql = "insert into job (title,description,createTime,teacherid) values(@title,@description,@createTime,@teacherid)";
            ParamMap param = ParamMap.newMap();
            param.Add("title",title);
            param.Add("description", description);
            param.Add("createTime", DateTime.Now.ToString());
            param.Add("teacherid", teacherid);
            db.ExcuteSQL(sql, param);
            return Json("dddd");
        }
    }
}
